//2009/08/08 01:46:18
#include <string>
#include <vector>
#include <algorithm>

using namespace std;

class Justifier
{
public:
    vector <string> justify(vector <string> textIn)
    {
        int sz = 0;
        for (int i=0; i<textIn.size(); i++) 
			sz = sz > textIn[i].size() ? sz : textIn[i].size();
		vector<string> ret;
		for(int i=0; i<textIn.size(); i++)
		{
			string s(sz - textIn[i].size(), ' ');
			s += textIn[i];
			ret.push_back(s);
		}
		return ret;
    }
};
